import java.util.*;

/**
 * The class, which extend the super class Publication, represent a Book or a Collection.
 * 
 */
public class BookOrCollection extends Publications {
	private String publisher;
	/**
	 * Construct a BookOrCollection object with the specified list of author, title, 
     * year of publication, ISSN code, ISBN code and publisher name.
     * The ISSN code must be a numeric string of 8 character.
     * The ISBN code must be a numeric string of 13 character
     * ISSN and ISBN code can also be initialized at null.
     * 
	 * @param theAuthors the list of author object.
     * @param aTitle the title of Book or Collection.
     * @param aYear the year of publication.
     * @param aIssn the ISSN code. 
     * @param aIsbn the ISBN code.
	 * @param aPublisher the publisher name.
	 */
	public BookOrCollection(List<Author> theAuthors, String aTitle, int aYear,
			String aIssn, String aIsbn, String aPublisher) {
		super(theAuthors, aTitle, aYear, aIssn, aIsbn);
		if(!aPublisher.equals(""))
			this.publisher = aPublisher;
		else 
			throw new IllegalArgumentException();
	}
	/**
	 * Return the publisher of the book or collection.
	 * 
	 * @return the publisher name.
	 */
	public String getPublisher() {
		return publisher;
	}

	@Override
	/**
     * Returns the String representation of the Book or Collection.
	 * 
	 * @return the string representation.
     */
	public String toString() {
		return "BookOrCollection [publisher=" + publisher + ", "+ super.toString()
				+ "]";
	}
}
